import React from 'react';
import ReactDOM from 'react-dom/client';
import KeepAlive from 'react-fiber-keep-alive';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import App from './App';
import './index.css';
import BaseConfigProvider from './providers/base-config';
import store, { persistor } from './store/store';

const root = document.getElementById('root');

ReactDOM.createRoot(root as HTMLElement).render(
  // <React.StrictMode>
  <KeepAlive.Provider value={root}>
    <BaseConfigProvider>
      <Provider store={store}>
        <PersistGate persistor={persistor}>
          <App />
        </PersistGate>
      </Provider>
    </BaseConfigProvider>
  </KeepAlive.Provider>
  // </React.StrictMode>
);
